﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace MISAPP.Classify.Service
{
    public class SelectList :MISAPP.MISInterface.iSelectList
    {
        protected bool isReverse = false;
        protected string field = string.Empty;
        protected List<string> selectList = null;
        protected bool _shoudGroupBy = true;
        #region iSelectList Members

        public string GetField()
        {
            return field;
        }

        public bool GetReverse()
        {
            return isReverse;
        }

        public void SetField(string p_field)
        {
            field = p_field;
        }

        public void SetReverse(bool p_reverse)
        {
            isReverse = p_reverse;
        }

        public void AddToList(string p_value)
        {
            if (selectList == null)
            {
                selectList = new List<string>();
            }
            selectList.Add(p_value);
        }

        public string[] GetListArray()
        {
            return selectList.ToArray();
        }

        public int GetListCount()
        {
            return selectList == null ? 0 : selectList.Count;
        }

        public void SetGroupBy(bool p_shouldGroupBy)
        {
            _shoudGroupBy = p_shouldGroupBy;
        }

        public bool IsGroupBy()
        {
            return _shoudGroupBy;
        }
        #endregion

       
    }

    
}
